#include "Utils.h"

namespace Utils{

    /*
    Splits a string by a character delimiter, fills elts with the data between the delimiters.
    If two delimiters occur in a row, a blank element is inserted into elts
    */
    int SplitString(const string &s, char delim, vector<string> &elts){
        stringstream ss(s);
        string item;
        int i = 0;
        while(getline(ss, item, delim)) {
            elts.push_back(item);
            i++;
        }
        return i;
    }

};
